home *** CD-ROM | disk | FTP | other *** search
/ Larry Magid's Essential Internet / Larry Magid's Essential Internet (Quarterdeck Corporation)(1995).ISO / qsockpro.qip / FLONLINE.MPS < prev    next >
Text File  |  1995-10-09  |  2KB  |  73 lines

  1. # Florida Online PPP and SLIP script
  2. # Copyright 1995 Quarterdeck Corporation
  3. # 5-9-95 CEL
  4.  
  5. #define the variables we will need
  6.  
  7. STRING username
  8. STRING password
  9. STRING framing
  10. STRING IPAddress
  11.  
  12. # uncomment for debugging
  13. # TRACE ON  
  14.  
  15. # reset maximum login timeout. 
  16.  
  17. SetTimeout      60             
  18.  
  19. # Get username from access method
  20. CfgGetValue "Username" username
  21.  
  22. # if the Username field is empty, prompt the user for it.
  23. IF result = 0 THEN
  24.     GetInput "Enter your user name" username
  25.     IF result = 0 THEN
  26.         PRINT "Warning, no username entered"
  27.     ELSE
  28.         PRINT "Username set to:"; username
  29.     ENDIF
  30. ENDIF
  31.  
  32. # get password from access method
  33. CfgGetValue "Password" password
  34.  
  35. # if the Password field is empty, prompt the user for it.
  36. IF result = 0 THEN
  37.     GetPassword "Enter your password" password
  38.     IF result = 0 THEN
  39.         PRINT "Warning, no password entered"
  40.     ELSE
  41.         # NOTE: Don't print password.
  42.         PRINT "Password set."
  43.     ENDIF
  44. ENDIF
  45.  
  46. # get framing layer (MPPPP, MPSLIP)
  47. # abort with an error if we can't read the Framing setting
  48. CfgGetValue "Framing" framing
  49. IF result = 0 THEN
  50.     ABORT "Can't read 'Framing' setting from qdeck.ini"
  51. ENDIF
  52.  
  53. CommWaitFor "Login:"
  54.     CommSend username
  55.     CommSend "%r"
  56.  
  57. CommWaitFor "Password:"
  58.     CommSend password
  59.     CommSend "%r"
  60.  
  61. # if SLIP, we need to get the IP address
  62. # wait for string that precedes IP address then get IP address
  63. IF framing = "MPSLIP" THEN
  64.     PRINT "%rGetting IP address for SLIP"
  65.  
  66.     CommWaitFor ") to"
  67.         CommReadIPAddr IPAddress
  68.     CfgSetValue "IPAddress" IPaddress
  69.     PRINT "%rIP Address set to:"; IPAddress
  70. ENDIF
  71.  
  72. END
  73.